package com.ozo.cloud.manage.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 权限 视图对象
 * </p>
 *
 * @author qiangesoft
 * @since 2024-07-11
 */
@Schema(description = "权限视图对象")
@Data
@NoArgsConstructor
public class SysPermissionTreeVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    private Long id;

    @Schema(description = "上级id")
    private Long parentId;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "路由")
    private String path;

    @Schema(description = "组件")
    private String component;

    @Schema(description = "元数据")
    private Meta meta;

    @Schema(description = "子菜单")
    private List<SysPermissionTreeVO> children;

    /**
     * 元数据
     */
    @Getter
    @Setter
    public static class Meta {

        @Schema(description = "标题")
        private String title;

        @Schema(description = "icon")
        private String icon;

        @Schema(description = "类型")
        private String type;

        @Schema(description = "是否隐藏")
        private Boolean hidden;

        @Schema(description = "是否固定")
        private Boolean affix;

    }

}
